{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['i', 'a']"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#first\n",
    "vowels=['a','e','i','o','u']\n",
    "word = \"Milliways\"\n",
    "found = []\n",
    "for letter in word:\n",
    "    if letter in vowels:\n",
    "        if letter not in found:\n",
    "            found.append(letter)\n",
    "found\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "please input a word:Hello, How are you, David !\n",
      "e\n",
      "o\n",
      "a\n",
      "u\n",
      "i\n"
     ]
    }
   ],
   "source": [
    "#second\n",
    "vowels=['a','e','i','o','u']\n",
    "word = input(\"please input a word:\")\n",
    "found = []\n",
    "for letter in word:\n",
    "    if letter in vowels:\n",
    "        if letter not in found:\n",
    "            found.append(letter)\n",
    "for vowel in found:\n",
    "    print(vowel)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1, 2, 4]\n",
      "[1, 4]\n",
      "[4]\n",
      "[9, 4]\n",
      "[9, 'hello', 4]\n"
     ]
    }
   ],
   "source": [
    "#third\n",
    "nums=[1,2,3,4]\n",
    "hex(id(nums))\n",
    "dir(nums)\n",
    "nums.remove(3)\n",
    "print(nums)\n",
    "nums.pop(1)\n",
    "print(nums)\n",
    "nums.pop(0)\n",
    "print(nums)\n",
    "nums.insert(0,9)\n",
    "print(nums)\n",
    "nums.insert(1,\"hello\")\n",
    "print(nums)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "xxxxx\n",
      "a  founded : 1\n",
      "e  founded : 2\n",
      "i  founded : 0\n",
      "o  founded : 4\n",
      "u  founded : 1\n",
      "\n",
      "xxxxx\n",
      "a  ***  1\n",
      "e  ***  2\n",
      "i  ***  0\n",
      "o  ***  4\n",
      "u  ***  1\n",
      "\n",
      "xxxxx\n",
      "1\n",
      "2\n",
      "0\n",
      "4\n",
      "1\n",
      "a\n",
      "e\n",
      "i\n",
      "o\n",
      "u\n"
     ]
    }
   ],
   "source": [
    "# thrid\n",
    "found={'a':0,'e':0, 'i':0, 'o':0,'u':0}\n",
    "\n",
    "#sayings=\"Hello world, how are you!\"\n",
    "sayings=input(\"please input :\")\n",
    "pls =list(sayings)\n",
    "for letter in pls:\n",
    "    if letter in found.keys():\n",
    "        found[letter]=found[letter]+1\n",
    "        \n",
    "print(\"\\nxxxxx\")\n",
    "for key in found.keys():\n",
    "    print(key,\" founded :\", found[key])\n",
    "    \n",
    "print(\"\\nxxxxx\")\n",
    "for (key, value) in found.items():\n",
    "    print(key,\" *** \", value )    \n",
    "\n",
    "print(\"\\nxxxxx\")\n",
    "for value in found.values():\n",
    "    print(value)\n",
    "for key in found:\n",
    "    print(key)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
